<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
<form id="form" method="post">
<div>
	<label for="password_r">Nouveau mot de passe</label>
	<input type="password" id="password_r" name="password_r">
</div>
<div>
	<label for="password_r_c">Confirmez le mot de passe</label>
	<input type="password" id="password_r_c">
</div>
<div>
	<input type="submit" value="Ré-initialiser">
</div>
</form>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.8.3.min.js"></script>
<script type="text/javascript">
//<![CDATA[
	$('form').bind('submit', function(){
		if ($('#password_r').val() != $('#password_r_c').val()) {
			alert('Le mot de passe et sa confirmation sont différents');
			return false;
		}
		if ($('#password_r').val() == "") {
			alert('Le mot de passe ne peux être nul');
			return false;
		}
	});
//]]>
</script>
</body>
</html>